﻿@{
    Layout = null;
}

<!DOCTYPE html>
@model ElingOA6_Admin_DSJCJ.Model.ItemRequisitionApply
<html>
<head>
    <title></title> 
 

  @if (false)
   { 
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
   }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)

         <script>
             if (top.boardtop) {
                 top.boardtop.head_txt.innerText = "物品领用审核";
             }
    </script>
<script>
    $(document).ready(function () {
        $("#toolMenu").smartFloat();
        var hdjsAlert = $("#hdjsAlert").val();
        if (hdjsAlert != "") {
            if (hdjsAlert == "操作成功") {
                alert(hdjsAlert);
                window.location.href = rootPath + "/Admin/OfficeItemUseCheck/Index";
            }
            else {
                alert(hdjsAlert);
            }
        }
    });

    function popDialog(itemNo) {
        window.showModalDialog(rootPath + "/Admin/OfficeItemPurchaseApply/OfficeItemPurchaseApplyAddEntryInfo?itemNo=" + itemNo, 'popDialog', 'dialogWidth:500px;dialogHeight:220px');
    }

    function OK() {
        form1.submit();
    }

    function MenuTop_emClick(source, e) {
        switch (e.item.name) {
            case "btnSave":
                {
                    //保存
                    OK();
                    break;
                }
            case "btnCancel":
                {
                    window.location.href = rootPath + "/Admin/OfficeItemUseCheck/Index";
                    break;
                }
        }
    }
</script>
</head>
<body>
@using (Html.BeginForm("Save", "OfficeItemUseCheck", FormMethod.Post, new { id = "form1" }))
{
     <div class="floatToolMenu" id="toolMenu">
        @Html.DevExpress().Menu(settings =>
   {
       settings.Name = "toolBarMenu";
       settings.ItemAutoWidth = false;
       settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
       settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
       settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
       settings.Items.Add(item =>
       {
           item.Name = "btnSave";
           item.Text = "保存";
           item.ClientEnabled = true;
           item.Image.Url = Url.Content("~/Content/ControlImages/filesave.png");

       });
       settings.Items.Add(item =>
       {
           item.Name = "btnCancel";
           item.Text = "取消";
           item.ClientEnabled = true;
           item.Image.Url = Url.Content("~/Content/ControlImages/no.png");

       });
       settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
       settings.ItemLinkMode = ItemLinkMode.ContentBounds;
   }).GetHtml()
   </div>
    <div>
  <table width="100%" align="center" class="tableForm" border="0">
            <tr>
                <th align="right" class="tdClass">申请单号:</th>
                <th style=" text-align:left">
                    @Html.DevExpress().Label(settings =>
               {
                   settings.Name = "FItemRequisitionApplyID";
                   settings.Text = Model.FItemRequisitionApplyID == 0 ? "待生成..." : Model.FItemRequisitionApplyID.ToString();
                   settings.Properties.Style.ForeColor = System.Drawing.Color.Red;
               }).GetHtml()
                </th>
                 <th align="right">填报人:</th>
                <th style=" text-align:left">
                    @Html.DevExpress().Label(settings =>
               {
                   settings.Name = "FInsEmplNo";
                   settings.Text = Model.FInsEmplNo;
               }).GetHtml()
                </th>
            </tr>
                        <tr>
                <th align="right" class="tdClass">申请人:</th>
                <th style=" text-align:left">
                <table width="100%">
                <tr>
                <td>
                 @Html.DevExpress().Label(settings =>
               {
                   settings.Name = "FApplyEmplName";
                   settings.Text = Model.FApplyEmplName;
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(99);
               }).GetHtml()
                </td>
               
                </tr>
                </table>
                </th>
    @Html.Hidden("hdFApplyEmplNo", Model.FApplyEmplNo)
                 <th align="right">部门:</th>
                <th style=" text-align:left">
                    @Html.DevExpress().Label(settings =>
               {
                   settings.Name = "FApplyDeptName";
                   settings.Text = Model.FApplyDeptName;
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(45);
               }).GetHtml()
                </th>
    @Html.Hidden("hdFApplyDeptNo", Model.FApplyDeptNo)        
            </tr>
             <tr>
                <th align="right" class="tdClass" style=" width:10%">备注:</th>
                <td colspan="5">
                    @Html.DevExpress().Label(settings =>
               {
                   settings.Name = "FApplyReason";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(99);
                   settings.Text = Model.FApplyReason;
               }).GetHtml()
                </td>
            </tr>
            <tr>
            <th align="right" class="tdClass">审批情况:</th>
             <td colspan="5" class="tdClass">
                         @Html.DevExpress().RadioButtonList(settings =>
     {
         settings.Name = "FStatus";
         settings.Properties.RepeatLayout = System.Web.UI.WebControls.RepeatLayout.Table;
         settings.Properties.RepeatDirection = System.Web.UI.WebControls.RepeatDirection.Horizontal;
         settings.Properties.RepeatColumns = 3;
         settings.Properties.ValueField = "Value";
         settings.Properties.TextField = "Text";
         settings.SelectedIndex = 0;
     }).BindList(new List<SelectListItem> { 
                 new SelectListItem { Text = "通过", Value = "A"}, 
                 new SelectListItem { Text = "未通过", Value = "R" },
                 new SelectListItem { Text = "退回", Value = "B" }}).Bind(Model.FStatus).GetHtml()
            </td>
            </tr>

            <tr>
                <td colspan="6" class="tdClass">
                <table id="position" width="100%" align="center" border="0" class="tableForm">
                   <tr>
                        <th width="20%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "用品名称"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                        <th width="15%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "单价"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                        <th width="15%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "库存"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                        <th width="15%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "申请数量"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                        <th width="15%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "审核数量"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                    </tr>   
                    @Html.Raw(ViewData["ShowList"].ToString())
                </table>     
                </td>
            </tr>
    </table>
    @Html.Hidden("hdjsAlert", (ViewData["jsAlert"]))   
    @Html.Hidden("hdfItemRequisitionApplyID", ViewData["fItemRequisitionApplyID"])     
    </div>
}
</body>
</html>
